<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
            <li class="active"><a>打款记录</a></li>
            <li><a href="javascript:parent.openIframeLayer('{:url('order/payment_add',array('id'=>input('id')))}','新增打款',{area:['30%','70%']});">新增打款</a></li>
        </ul>
        <br>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th>日期</th>
					<th>金额</th>
					<th>凭证</th>
					<th>备注</th>
					<th>状态</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="list" item="vo">
					<tr>
						<td>{$vo.date}</td>
						<td>{$vo.amount}</td>
						<td>
							<if $vo.image>
								<a href="javascript:parent.imagePreviewDialog('{:cmf_get_image_preview_url($vo.image)}');">
	                                <i class="fa fa-photo fa-fw"></i>
	                            </a>
	                        </if>
						</td>
						<td>{$vo.remark}</td>
						<td>{$vo.status_text}</td>
					</tr>
				</foreach>
			</tbody>
		</table>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
    <script src="__STATIC__/layui/layui.js"></script>
    <script type="text/javascript">
        layui.use(['layer'], function(){
            var layer = layui.layer;

            $('.confirm').click(function(){
                var id = $(this).data('id');
                layer.confirm('请确认！', {icon: 7, title:'提示'}, function(index){
                    $.ajax({
                        type: 'get',
                        url: '{:url("order/payment_confirm")}',
                        data: {id:id},
                        success:function(res) {
                            layer.msg(res.msg)
                            setTimeout(function(){
                                layer.close(index);
                                location.reload();
                            },1000);
                        }
                    });
                });
            });

        });
    </script>
</body>
</html>